<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Coming Eating</title>
<link rel="shortcut icon" href="Tpl/hotel.ico"/>
<!-- href属性中的路径要相对主文件定位，否则会加载不到 -->
<link rel="stylesheet" type="text/css" href="Public/Css/Base.css"/>
<link rel="stylesheet" type="text/css" href="Public/Css/foodlist.css"/>
<link rel="stylesheet" type="text/css" href="Public/Css/position.css"/>
<link rel="stylesheet" type="text/css" href="Public/Css/nav.css"/>

<script type="text/javascript" src="Public/Js/jquery.js"></script>
<script type="text/javascript" src="Public/Js/main.js"></script>
<script type="text/javascript" src="Public/Js/lightbox.min.js"></script>
<script type="text/javascript">
		$(document).ready(function() {
			$('#main_nav').allenMenu();
			$('#slide').allenSlide();
			$('a[name=need_lightbox]').lightBox();
		});
		
		function buyRightNow(){
			//先得到表单
			var form = $("[name='readytobuy']");
			//再将表单的action设置成所需要的地址
			form.attr('action','ShoppingCar.php?flag=display');			
			form.submit();
			
		}
		function addTocar(){
			//先得到表单
			var form = $("[name='readytobuy']");
			//再将表单的action设置成所需要的地址
			form.attr('action','AddToCar.php?flag=addtocar');			
			form.submit();					
		}
		
		function checkFoodNum(){
			var Reg = /^[1-9]{1}[0-9]*$/;
			var numValue = $("[name='food_num']").val();

			if(!Reg.test(numValue)){
				
				alert("请正确填写购买数量！");
				
			}
			
		}

</script>

</head>
<body >

<!-- 这个地方用一个标志  确定是否显示这个 -->
<{if $smarty.session.loginFlag eq 0}>
	
	<{include file='Public/hide.html'}>
<{/if}>

<{include file='Public/indexheader.html'}>

<{include file='Public/search.html'}>

<{include file='Public/position.html'}>

<div id="foodlist">
	<{*分左右部分  左写热点和最近浏览   有些产品信息*}>
	<{include file='Public/hotsort.html'}>
	<div id='foodlistright'>
	<{foreach from=$res item=v}>
		<div id='eachfood'>
			<a href='FoodDetail.php?food_id=<{$v.food_id}>'><img id='foodpic' src="Admin/Upload/<{$v.food_pic}>" title="<{$v.food_name}>" alt="<{$v.food_name}>"/></a>	
			<table border=0>
			
			<tr>
				<td width="300px" height="31px;"><a href='FoodDetail.php?food_id=<{$v.food_id}>' style="font-size:15px;"><{$v.food_name}></a></td>
				<td width="115px"><font style="font-size:13px">平价:</font>&yen;&nbsp;<{$v.food_singleprice}></td>
				<td width="115px"><font style="font-size:13px">会员：</font>&yen;&nbsp;<{$v.food_userprice}></td>
			</tr>
			<tr>
				<td height="70px" style="font-size:13px;"><{$v.food_content}></td>
				<td><a href='ShoppingCar.php?flag=display&food_id=<{$v.food_id}>'><img src='Public/Images/buynow.jpg'/></a></td>
				<td><a href='AddToCar.php?flag=Daddtocar&food_id=<{$v.food_id}>'><img src='Public/Images/cardpic.jpg' alt="点击添加到购物车"/></a></td>
			</tr>

			</table>
		</div>
		<{foreachelse}>
			暂时没有食品信息
		<{/foreach}>
		<div id="page"><{$pageStr}></div>
	</div>
	
	

</div>
<{include file='Public/footer.html'}>
</body>
</html>